<?php

class Adept_Db_Query_Delete extends Adept_Db_Query_Conditional 
{
    
    protected $table;
    
    const NEW_LINE = "\n\t";
    
    public function __toString() 
    {
        $sql = 'DELETE FROM ' . $this->table;
        if (count($this->where) > 0) {
            $sql .= self::NEW_LINE . 'WHERE ' . implode(' ', $this->where);
        }
        return $sql;
    }    
    
    public function table($table) 
    {
        $this->table = "`{$table}`";
        return $this;
    }    


}
